Distributed URL shortening platform using Base62 encoding, Redis caching, PostgreSQL persistence and a real-time analytics dashboard.
This platform converts long URLs into compact Base62 encoded links and provides detailed analytics on usage patterns. The application uses Redis as a caching layer above PostgreSQL, achieving an 85%+ cache hit ratio while reducing read latency by approximately 60%. The system also includes a real-time analytics dashboard built with Angular for tracking redirects, traffic and usage metrics.
+----------------------+
| USER |
+----------+-----------+
|
v
+----------------------+
| ANGULAR UI |
+----------+-----------+
|
v
+----------------------+
| SPRING BOOT API |
+----------+-----------+
|
v
+----------------------+
| REDIS CACHE |
+----------+-----------+
|
Cache Hit?
|
+-----+-----+
| |
YES NO
| |
v v
Response +------------------+
| POSTGRESQL |
+--------+---------+
|
v
Update Redis Cache
Long URLs are converted into compact short URLs
using a Base62 encoding strategy.
Each generated identifier uses:
0-9 → 10 characters
a-z → 26 characters
A-Z → 26 characters
Total = 62 possible symbols
This allows millions of unique URLs while
maintaining compact link sizes.
Generates compact unique URLs using efficient Base62 conversion.
Frequently accessed URLs are served directly from Redis.
Real-time tracking of clicks, redirects and URL usage metrics.
Fully containerized application supporting consistent deployments.
Tracks overall redirect volume.
Identifies highest traffic URLs.
Provides real-time analytics insights.
CACHE HIT RATIO
LATENCY REDUCED
CONTAINERIZED
Designing a short URL generation strategy that avoids collisions while maintaining compact identifiers. Base62 encoding was implemented to support a large number of unique URLs without increasing link length.
Redirect requests are highly read-intensive. Redis was introduced as a caching layer above PostgreSQL, significantly reducing database load and improving response times.
Click events needed to be captured and reflected within the analytics dashboard while maintaining responsive redirect performance.
Cache Hit Ratio
Read Latency Reduction
Containerized Deployment
Building this project strengthened my understanding of caching strategies, database optimization, REST API design, frontend-backend integration and distributed application architecture. It also provided hands-on experience working with Redis, PostgreSQL, Docker and Angular in a production-style full-stack environment.